import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;

public class Try {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayDeque<Character> de = new ArrayDeque<>();
        ArrayDeque<Character> de1 = new ArrayDeque<>();
        ArrayDeque<Character> de2 = new ArrayDeque<>();
        String s = sc.next();
//        String s = "{{[]}}";

        char[] chars = s.toCharArray();
        for (char aChar : chars) {
            de.addFirst(aChar);
        }

        while(!de.isEmpty()){
            char str1 = de.pollFirst();
            char str2 = de.pollLast();
            if(str1 == '{' && str2 != '}' || str1 == '[' && str2 != ']' || str1 == '(' && str2 != ')'){
                System.out.println("输入错误");
                break;
            }else if(str1 == '}' && str2 != '{' || str1 == ']' && str2 != '[' || str1 == ')' && str2 != '('){
                System.out.println("输入错误");
                break;
            } else{
               if(str1 == '}' || str1 == '{'){
                   de1.addFirst('红');
                   de2.addFirst('红');
               }else if(str1 == ']' || str1 == '['){
                   de1.addFirst('黄');
                   de2.addFirst('黄');
               }else if(str1 == ')' || str1 == '('){
                   de1.addFirst('蓝');
                   de2.addFirst('蓝');
               }
            }
        }
        if(de.isEmpty()){
            while(!de1.isEmpty()){
                System.out.println(de1.pollLast());
            }
            while(!de2.isEmpty()){
                System.out.println(de2.pollFirst());
            }
        }
    }
}
